package com.leinbo.onedoc.utils

/**
 * Created by sundaiyue on 2022/11/28 04:52
 */
object LogUtils {
    private val DEFAULT = "debug"

    private val ERROR = "error"

    fun log(log: String) {
        LoggerHolder.getLogger(DEFAULT).info(log)
    }

    fun log(error: String, t: Throwable?) {
        LoggerHolder.getLogger(DEFAULT).error(error, t)
    }

    fun log(category: String, log: String?) {
        LoggerHolder.getLogger(category).info(log)
    }

    fun log(category: String, error: String?, t: Throwable?) {
        LoggerHolder.getLogger(category).error(error, t)
    }

    fun error(msg: String?, t: Throwable?) {
        LoggerHolder.getLogger(ERROR).error(msg, t)
    }
}
